projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c477f68
)
Don't profile syntax-ppss any more.
author
Stefan Monnier
<monnier@iro.umontreal.ca>
Sun, 25 Nov 2001 22:05:17 +0000
(22:05 +0000)
committer
Stefan Monnier
<monnier@iro.umontreal.ca>
Sun, 25 Nov 2001 22:05:17 +0000
(22:05 +0000)
(syntax-after): New fun.
lisp/emacs-lisp/syntax.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/syntax.el
b/lisp/emacs-lisp/syntax.el
index f00c8752dd483791c0bf50f668d121416a0f544d..68b2eaabbcbcb50cdca10366993076e3365c826e 100644
(file)
--- a/
lisp/emacs-lisp/syntax.el
+++ b/
lisp/emacs-lisp/syntax.el
@@
-279,7
+279,13
@@
Point is at POS when this function returns."
;; (with-current-buffer (or buffer (current-buffer))
;; (syntax-ppss-depth (syntax-ppss))))
-(elp-instrument-list '(syntax-ppss))
+(defun syntax-after (pos)
+ "Return the syntax of the char after POS."
+ (unless (or (< pos (point-min)) (>= pos (point-max)))
+ (let ((st (if parse-sexp-lookup-properties
+ (get-char-property pos 'syntax-table))))
+ (if (consp st) st
+ (aref (or st (syntax-table)) (char-after pos))))))
(provide 'syntax)
;;; syntax.el ends here